<template>
  <div class="ys-page-header">
    <div class="ys-page-header__left" @click="$emit('back')">
      <i class="ys-icon-back"></i>
      <div class="ys-page-header__title">
        <slot name="title">{{ title }}</slot>
      </div>
    </div>
    <div class="ys-page-header__content">
      <slot name="content">{{ content }}</slot>
    </div>
  </div>
</template>

<script>
// import { t } from 'ys-ui/src/locale';
export default {
  name: 'ysPageHeader',

  props: {
    title: {
      type: String,
      default() {
        return '返回';
      }
    },
    content: String
  }
};
</script>
<style lang="less">
.ys-page-header {
    display: flex;
    line-height: 24px;
}
.ys-page-header__left {
    display: flex;
    cursor: pointer;
    margin-right: 40px;
    position: relative;
}
.ys-page-header__left .ys-icon-back {
    font-size: 18px;
    margin-right: 6px;
    align-self: center;
}
.ys-page-header__title {
    font-size: 14px;
    font-weight: 500;
}
.ys-page-header__content {
    font-size: 18px;
    color: #303133;
}
.ys-page-header__left:after {
    content: "";
    position: absolute;
    width: 1px;
    height: 16px;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #dcdfe6;
}
</style>